package com.xuecheng.media.service;

import com.xuecheng.commons.model.dto.MediaDto;
import com.xuecheng.commons.model.dto.MediaQueryDto;
import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.dto.VodUploadDto;
import com.xuecheng.commons.model.vo.MediaVo;
import com.xuecheng.commons.model.vo.ResourceVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.commons.model.vo.VodUploadVo;
import com.xuecheng.media.domain.Media;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * 媒资信息 服务类
 */
public interface MediaService extends IService<Media> {
    //获取阿里云上传凭证
    ResponseResult<VodUploadVo> createToken(VodUploadDto dto) throws Exception;
    //刷新阿里云上传凭证
    ResponseResult<VodUploadVo> refreshToken(String videoId) throws Exception;
    //保存媒资信息
    ResponseResult saveMedia(MediaDto dto) throws Exception;
    //分页查询媒资信息
    ResponseResult<MediaVo> findMediaList(PageRequest pageRequest, MediaQueryDto dto);
    //根据id删除媒资信息
    ResponseResult deleteById(Long mediaId) throws Exception;
    //根据id获取媒资URL地址
    ResponseResult<ResourceVo> findMediaUrl(Long mediaId) throws Exception;
}
